/* 聊天机器人样式 */
body { 
    font-family: Arial, sans-serif; 
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.buttons-container {
    display: flex;
    gap: 10px;
}

.main-content {
    display: flex;
    flex-direction: column;
}

#chat-container { 
    height: 400px; 
    border: 1px solid #ccc; 
    padding: 10px; 
    overflow-y: auto; 
    margin-bottom: 10px; 
    border-radius: 5px;
    background-color: #f9f9f9;
}

#input-container { 
    display: flex; 
}

#message-input { 
    flex-grow: 1; 
    padding: 8px; 
    border-radius: 4px;
    border: 1px solid #ccc;
}

button { 
    padding: 8px 16px; 
    background: #4CAF50; 
    color: white; 
    border: none; 
    cursor: pointer; 
    border-radius: 4px;
    margin-left: 5px;
}

button:hover {
    background: #45a049;
}

.tool-call { 
    background-color: #f0f0f0; 
    padding: 5px; 
    border-radius: 5px; 
    margin-top: 5px; 
    font-size: 0.9em; 
    border-left: 3px solid #4CAF50;
}

/* 工具面板样式 */
.tools-toggle-button {
    background-color: #2196F3;
}

.tools-toggle-button:hover {
    background-color: #0b7dda;
}

.tools-panel {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.tools-panel.hidden {
    display: none;
}

.tools-list {
    max-height: 200px;
    overflow-y: auto;
}

.tool-item {
    margin-bottom: 8px;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.tool-item label {
    margin-left: 8px;
    cursor: pointer;
}

/* 直接调用工具样式 */
.direct-tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.tool-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tool-card h4 {
    margin-top: 0;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.tool-card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85em;
    margin-bottom: 3px;
    color: #555;
}

.input-group input {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.execute-button {
    background-color: #ff9800;
    margin-top: 8px;
    margin-left: 0;
}

.execute-button:hover {
    background-color: #e68a00;
}

/* 工具构建界面样式 */
.builder-toggle-button {
    background-color: #9c27b0;
}

.builder-toggle-button:hover {
    background-color: #7b1fa2;
}

.parameter-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.parameter-item input {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.parameter-item button {
    background-color: #f44336;
    padding: 4px 8px;
    font-size: 12px;
}

.parameter-item button:hover {
    background-color: #d32f2f;
}

.add-param-button {
    background-color: #2196F3;
    margin-top: 10px;
}

.code-editor {
    margin-top: 15px;
}

.code-editor textarea {
    width: 100%;
    min-height: 150px;
    font-family: monospace;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.save-tool-button {
    background-color: #4CAF50;
    margin-top: 15px;
}

.frontend-tool {
    border-left: 3px solid #9c27b0;
} 